%h3 Application Settings
%table.table.table-bordered
  %tr
    %td RabbitMq Trace Exchange Name
    %td= app["exchangename"]
  %tr
    %td Queue Name
    %td= app["queuename"]
     
%h3 Registered RabbitMQs
%form(action="/rabbitmqsettings/edit" method="POST")       
%table.table.table-bordered.table-striped
  %thead
    %tr
      %td ID
      %td Display Name
      %td Hostname
      %td Username
      %td Enabled
  %tbody
    - rabbit.each do|item|
      %tr
        %form(action="/rabbitmqsettings/edit" method="POST")  
          %td
            %input{:type => "text", :readonly => "", :name=>"id", :value=>item["id"]}/
          %td
            %input{:type => "text", :readonly => "", :name=>"displayname", :value=>item["displayname"]}/
          %td
            %input{:type => "text", :readonly => "",:name=>"hostname", :value=>item["hostname"]}/
          %td
            %input{:type => "text", :readonly => "",:name=>"username", :value=>item["username"]}/
          %td
            %input{:type => "checkbox", :readonly => "",:name=>"enabled", :checked=>item["enabled"]}/
          %td
            %a{:href => "/rabbitmqsettings/edit/#{item["id"]}"} edit
            %a{:href => "/rabbitmqsettings/delete/#{item["id"]}"} delete
            
  %tfoot
    %tr
      %td{:colspan => "6"}
        %form(action="/rabbitmqsettings/add" method="POST")  
          %a{:href => "/rabbitmqsettings/add"} Add New
    
%h3 Consumers      
%table.table.table-bordered
  - consumers.each do|item|
    %tr
      %td= item["name"]
      %td= item["enabled"]

